﻿using System.Windows;
using System.Windows.Controls;
namespace RPAVIEW.views.EditPage.flows.GetDateN {
    /// <summary>
    /// Input.xaml 的交互逻辑
    /// </summary>
    public partial class Input:BaseParamViewAction{
        public Input() {
            InitializeComponent();
        }

        public override void UpdateSource() {
            this.dateType.GetBindingExpression(ComboBox.SelectedIndexProperty).UpdateSource();
            this.pickDate.GetBindingExpression(DatePicker.SelectedDateProperty).UpdateSource();
        }

        private void DateTypeChanged(object sender, SelectionChangedEventArgs e) {
            if(this.dateType.SelectedIndex == 0) {
                this.datepickerrow.Height = new GridLength(0);
            } else { 
                this.datepickerrow.Height = GridLength.Auto;
            }
        }
    }
}
